<!DOCTYPE html>
<html lang="en">
    <head>
        <meta charset="UTF-8" />
        <meta name="viewport" content="width=device-width, initial-scale=1.0" />
        <title>system</title>
    </head>
    <body>
        <script>
            //pending 准备  任务完成：fulfilled 成功完成  rejected 拒绝
            let p = new Promise((resolve, reject) => {
                setTimeout(() => resolve('成功'), 1000)
            }).then(
                value => console.log(value),
                r => console.log(r)
            )
            console.log('同步...')
        </script>
    </body>
</html>
